<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/views/common/includeCommon.jsp"%>

<!DOCTYPE html>
<html lang="en_US">
    <head>
    	<title><spring:message code="app.examPaper.title.alreadyUpload"/></title>
    	<style type="text/css">
	    	.btn-sm, .btn-group-sm > .btn {
			    font-size: 12px;
			    line-height: 20px;
			    margin-bottom: 3px;
			}
			.table {
			    width: 100%;
			    max-width: 100%;
			    font-size: 12px;
			    margin-bottom: 20px;
			}
    	</style>
    	<script type="text/javascript">
        	var batchId = '${batchId}';
    		var gradeNo = '${gradeNo}';
    		var courseNo = '${courseNo}';
        </script>
    	<script type="text/javascript" src="${ctx}/static/js/manage/examPaper/papers.js"></script>
    </head>
    <body>
    	<div class="row">
			<div class="col-md-12">
				<div class="panel panel-white">
					<div class="panel-body">
						<form style="position:relative" id="splitPage" action="${ctx}/manage/examPaper/papers/paperAlreadyUploadUI?batchId=${batchId}&gradeNo=${gradeNo}&courseNo=${courseNo}" method="POST" role="form" class="form-horizontal">  
							<!-- search part -->
							<div id="toolbar" class="panel panel-default" style="margin:-5 0 -5 0;padding:0 0 0 0;">
								<div class="panel-body">
									<div class="form-inline" role="form">
										<div class="form-inline form-group">
											<div class="input-group" style="width: 230px;margin-bottom: 5px;">
												<span class="input-group-addon"><spring:message code="app.examPaper.title.ksbh"/></span>
												<input class="form-control" name="query_kh" value="${query_kh}" 
													style="width:200px;" placeholder="<spring:message code="app.examPaper.placeholder.ksbh" />">
											</div>
											<div class="input-group" style="width: 230px;margin-bottom: 5px;">
												<span class="input-group-addon"><spring:message code="app.template.title.fileName"/></span>
												<input class="form-control" name="query_wjmc" value="${query_wjmc}" 
													style="width:200px;" placeholder="<spring:message code="app.template.placeholder.fileName1" />">
											</div>
											<div class="input-group" style="width: 230px;margin-bottom: 5px;">
												<span class="input-group-addon"><spring:message code="app.examPaper.title.checkStatus"/></span>
												<select name="query_sftg" value="${query_sftg}" class="form-control" style="width:200px;">
													<option value=""><spring:message code="app.common.title.select"/></option>
													<option value="0" <c:if test="${query_sftg=='0'}">selected="selected"</c:if>>
														<spring:message code="app.examPaper.checkStatus.title.wait"/>
													</option>
													<option value="1" <c:if test="${query_sftg=='1'}">selected="selected"</c:if>>
														<spring:message code="app.examPaper.checkStatus.title.yes"/>
													</option>
													<option value="2" <c:if test="${query_sftg=='2'}">selected="selected"</c:if>>
														<spring:message code="app.examPaper.checkStatus.title.no"/>
													</option>
													<option value="3" <c:if test="${query_sftg=='3'}">selected="selected"</c:if>>
														<spring:message code="app.examPaper.checkStatus.title.qk"/>
													</option>
												</select>
											</div>
											<div class="input-group" style="width: 230px;margin-bottom: 5px;">
												<span class="input-group-addon"><spring:message code="app.examPaper.title.cropStatus"/></span>
												<select name="query_sfcj" value="${query_sfcj}" class="form-control" style="width:200px;">
													<option value=""><spring:message code="app.common.title.select"/></option>
													<option value="1" <c:if test="${query_sfcj=='1'}">selected="selected"</c:if>>
														<spring:message code="app.examPaper.cropStatus.title.yes"/>
													</option>
													<option value="0" <c:if test="${query_sfcj=='0'}">selected="selected"</c:if>>
														<spring:message code="app.examPaper.cropStatus.title.no"/>
													</option>
												</select>
											</div>
											<div class="input-group" style="width: 230px;margin-bottom: 5px;">
												<span class="input-group-addon"><spring:message code="app.examPaper.title.zfmlx"/></span>
												<select name="query_zfm" value="${query_zfm}" class="form-control" style="width:200px;">
													<option value=""><spring:message code="app.common.title.select"/></option>
													<option value="1" <c:if test="${query_zfm=='1'}">selected="selected"</c:if>><spring:message code="app.courseTemplate.title.zm"/></option>
													<option value="2" <c:if test="${query_zfm=='2'}">selected="selected"</c:if>><spring:message code="app.courseTemplate.title.fm"/></option>
												</select>
											</div>
											<button type="submit" class="fa fa-search btn btn-warning btn-sm searchBtn"><spring:message code="app.common.action.search"/></button>
										</div>
									</div>
							  	</div>
							  	<!-- buttons part -->
							  	<div class="row">
									<div class="col-md-12 space20">
										<a href="#none" class="fa fa-trash-o btn btn-danger btn-sm btn-moreDelete"
											title="<spring:message code="app.examPaper.action.placeholder.moreDelete" />">
											<spring:message code="app.examPaper.action.moreDelete" />
										</a>
										<a href="#none" class="fa fa-trash-o btn btn-danger btn-sm btn-clear"
											title="<spring:message code="app.examPaper.action.placeholder.clear_paper" />">
											<spring:message code="app.examPaper.action.clear_paper" />
										</a>
										<a href="#none" class="fa fa-trash-o btn btn-danger btn-sm btn-clearCached"
											title="<spring:message code="app.examPaper.action.placeholder.clearCached" />">
											<spring:message code="app.examPaper.action.clearCached" />
										</a>
									</div>
								</div>
							</div>
							<!-- table part -->
							<table id="dataTable" class="table table-striped table-bordered table-hover table-full-width">
	                            <thead>
	                                <tr>
	                                    <th><input type="checkbox" id="checkbox_djAll" style="vertical-align: middle;"></th>
	                                    <th><spring:message code="app.template.title.fileName" /></th>
	                                    <th><spring:message code="app.examPaper.title.zfmlx" /></th>
	                                    <th><spring:message code="app.examPaper.title.ksbh" /></th>
	                                    <th><spring:message code="app.examPaper.title.ksxm" /></th>
	                                    <th><spring:message code="app.examPaper.title.checkStatus" /></th>
	                                    <th><spring:message code="app.examPaper.title.cropStatus" /></th>
	                                    <th><spring:message code="app.examPaper.title.createTime" /></th>
	                                    <th><spring:message code="app.common.action.operate" /></th>
	                                </tr>
	                            </thead>
	                            <tbody>
	                                <c:forEach items="${pagination.datas}" var="entity" varStatus="s">
	                                    <tr data-id="${entity.id}" data-tempid="${entity.courseTemplateId}">
	                                        <td><input type="checkbox" name="checkbox_dj" value="${entity.id}"></td>
	                                        <td style="word-wrap: break-word;word-break: break-all;">
	                                        	<a title="<spring:message code="app.examPaper.action.placeholder.paper_detail" />" class="btn-detail">
	                                        		${entity.shortPath}
	                                        	</a>
	                                        	<%-- <a target="_blank" onclick="viewPaper('${entity.id}','${entity.courseTemplateId}')" title="点击查看完整答卷-${entity.filePath}">${fn:length(entity.filePath) > 25 ? fn:substring(entity.filePath,0,25) : entity.filePath}${fn:length(entity.filePath) > 15 ? '...' : ''}</a> --%>
	                                        </td>
	                                        <td>
	                                        	<c:choose>
													<c:when test="${entity.zfmType==1}"><spring:message code="app.courseTemplate.title.zm"/></c:when>
													<c:otherwise><spring:message code="app.courseTemplate.title.fm"/></c:otherwise>
												</c:choose>
	                                        </td>
	                                        <td><c:out value="${entity.studentNo}" /></td>
	                                        <td><c:out value="${entity.studentName}" /></td>
	                                        <td>
	                                        	<c:choose>
													<c:when test="${entity.isPass==0}"><spring:message code="app.examPaper.checkStatus.title.wait"/></c:when>
													<c:when test="${entity.isPass==1}"><spring:message code="app.examPaper.checkStatus.title.yes"/></c:when>
													<c:when test="${entity.isPass==2}"><spring:message code="app.examPaper.checkStatus.title.no"/></c:when>
													<c:when test="${entity.isPass==3}"><spring:message code="app.examPaper.checkStatus.title.qk"/></c:when>
												</c:choose>
	                                        </td>
	                                        <td>
	                                        	<c:choose>
	                                        		<c:when test="${entity.isCrop==1}"><spring:message code="app.examPaper.cropStatus.title.yes"/></c:when>
	                                        		<c:otherwise><spring:message code="app.examPaper.cropStatus.title.no"/></c:otherwise>
	                                        	</c:choose>
	                                        </td>
	                                        <td><fmt:formatDate value="${entity.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
	                                        <td>
                                            	<a title="<spring:message code="app.examPaper.action.placeholder.upload_paper_zip" />" class="btn-delete">
                                            		<spring:message code="app.common.action.delete" />
                                            	</a>
	                                        </td>
	                                    </tr>
	                                </c:forEach>
	                            </tbody>
	                        </table>
	                        <div class="row" id="splitPageDiv">
								<jsp:include page="/views/common/splitPage.jsp">
									<jsp:param value="mainPanel" name="divId"/>
									<jsp:param value="splitPage" name="formId"/>
									<jsp:param value="splitPageDiv" name="splitPageDiv"/>
								</jsp:include>
							</div>
						</form>
				    </div>
				</div>
			</div>
		</div>
    </body>
</html>    